package zzs.generalframework.coder.core.encoder.temp.console.executor;

import zzs.generalframework.coder.common.model.ClazzBO;
import zzs.generalframework.coder.core.encoder.temp.console.dao.ImplementCoder;
import zzs.generalframework.coder.core.encoder.temp.console.dao.InterfaceCoder;

/**
 * @title
 * @description
 * @project zzs-coder
 * @package zzs.generalframework.coder.core.encoder.temp.console.executor
 * @author zzs
 * @date 2018年2月1日
 * @version 1.0
 */
public class CoderExecutor
{

	public static void main(String[] args)
	{
		CoderExecutor executor = new CoderExecutor();

//		 executor.daoInterface();

//		 executor.daoImpl();

//		 executor.serviceInterface();

		 executor.serviceImpl();

	}

	private void daoInterface()
	{
		ClazzBOFactory facory = new ClazzBOFactory();
		ClazzBO clazzBO = facory.getClassBO();
		clazzBO.setClassName("I" + clazzBO.getEntityCode() + "Dao");
		InterfaceCoder daoInterface = new InterfaceCoder();
		String content = daoInterface.createFile(clazzBO);
		System.out.println(content);

	}

	private void daoImpl()
	{
		ClazzBOFactory facory = new ClazzBOFactory();
		ClazzBO clazzBO = facory.getClassBO();

		clazzBO.setClassName(clazzBO.getEntityCode() + "DaoImpl");
		ImplementCoder daoImpl = new ImplementCoder();
		String content = daoImpl.createFile(clazzBO);
		System.out.println(content);
	}

	private void serviceInterface()
	{
		ClazzBOFactory facory = new ClazzBOFactory();
		ClazzBO clazzBO = facory.getClassBO();
		clazzBO.setClassName("I" + clazzBO.getEntityCode() + "Service");
		zzs.generalframework.coder.core.encoder.temp.console.service.InterfaceCoder serviceInterface = new zzs.generalframework.coder.core.encoder.temp.console.service.InterfaceCoder();
		String content = serviceInterface.createFile(clazzBO);
		System.out.println(content);

	}

	private void serviceImpl()
	{
		ClazzBOFactory facory = new ClazzBOFactory();
		ClazzBO clazzBO = facory.getClassBO();
		clazzBO.setClassName(clazzBO.getEntityCode() + "ServiceImpl");
		zzs.generalframework.coder.core.encoder.temp.console.service.ImplementCoder serviceImpl = new zzs.generalframework.coder.core.encoder.temp.console.service.ImplementCoder();
		String content = serviceImpl.createFile(clazzBO);
		System.out.println(content);
	}

}
